﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;
using DTO;
using System.Collections;
namespace WebNhaXuatBan
{
    public partial class Teamplate : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            TaiKhoanBUS tk = new TaiKhoanBUS();
            TaiKhoanDTO taiKhoanDTO=new TaiKhoanDTO();
            taiKhoanDTO.TenTaiKhoan=TextBox2.Text;
            taiKhoanDTO.MatKhau=TextBox3.Text;
            if (tk.KiemTraDangNhap(taiKhoanDTO) != null)
            {
                Session["TaiKhoan"] = tk.KiemTraDangNhap(taiKhoanDTO);
                Response.Redirect("default.aspx");
            }
        }

        protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
        {
           TaiKhoanDTO tk=null;
           ArrayList list = null;
           Session["TaiKhoan"] = tk;
           Session["GioHang"] = list;
        }

        protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("DangKy.aspx");
        }

        protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("ThanhToan.aspx");
        }

        protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("TimKiem.aspx?TieuChi="+DropDownList1.SelectedValue.ToString()+"&ChuoiTimKiem="+TextBox1.Text+"&SoBatDau=0");
        }
    }
}